package com.javatest.springboottask;

import com.javatest.springboottask.jmh.JmhBenchmark;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

@EnableAsync
@EnableScheduling
@SpringBootApplication
public class SpringbootTaskApplication {

  public static void main(String[] args) throws RunnerException {
    Options options =
        new OptionsBuilder().include(JmhBenchmark.class.getSimpleName()).forks(1).build();
    new Runner(options).run();
    SpringApplication.run(SpringbootTaskApplication.class, args);
  }
}
